//package com.welike.shibo.controller.admin;
//
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.welike.shibo.controller.BaseController;
//import com.welike.shibo.eneity.Admin;
//import com.welike.shibo.eneity.Goods;
//import com.welike.shibo.service.GoodsService;
//import io.swagger.annotations.ApiParam;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.servlet.ModelAndView;
//
///**
// * @author fangyu
// * @version v1.0.0
// * @since 2019-09-02 18:39
// */
//
//@Slf4j
//@Controller
//@RequestMapping(value = "/admin/goods")
//public class AdminGoodsController extends BaseController {
//
//    @Autowired
//    private GoodsService goodsService;
//
//
//    @GetMapping(value = "")
//    public ModelAndView goods_list(
//            Model model,
//            @ApiParam(name = "async", value = "异步加载", required = false)
//            @RequestParam(value = "async", required = false) boolean async,
//            @ApiParam(name = "page", value = "页数", required = false)
//            @RequestParam(value = "page", defaultValue = "1") int page,
//            @ApiParam(name = "limit", value = "每页条数", required = false)
//            @RequestParam(value = "pageSize", defaultValue = "10")int pageSize
//    ){
//        Admin admin = (Admin) getUser4Session();
//        if (admin == null){
//            return new ModelAndView("admin/login");
//        }
//        IPage<Goods> iPage = goodsService.queryGoodsPage(page, pageSize);
//        this.addModel(model, iPage, "goods");
//        return new ModelAndView(async ? "admin/goods_list :: .tab-content" : "admin/goods_list");
//
//    }
//
//}
